/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.foxline.model;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.SequenceGenerator;
import javax.persistence.Temporal;

/**
 *
 * @author ely
 */
@Entity
public class Annex implements Serializable {

    @Id
    @SequenceGenerator(sequenceName = "seq_annex", name = "seq_annex", allocationSize = 1)
    @GeneratedValue(generator = "seq_annex", strategy = GenerationType.SEQUENCE)
    private Long id;
    
    private String url;
    
    private String type;
    
    @Temporal(javax.persistence.TemporalType.DATE)
    private Date dateAt;
    
    //TODO Utilizar a url
    //private byte[] content;
    
     @Lob
    private byte[] fileByte;
    
    private String descricao;

    public Date getDateAt() {
        return dateAt;
    }

    public void setDateAt(Date dateAt) {
        this.dateAt = dateAt;
    }

    public String getDescricao() {
        return descricao;
    }

    public void setDescricao(String descricao) {
        this.descricao = descricao;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public byte[] getFileByte() {
        return fileByte;
    }

    public void setFileByte(byte[] fileByte) {
        this.fileByte = fileByte;
    }
    
    
}
